﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterALSafa.Master" AutoEventWireup="true"
    CodeBehind="TE_Topic_Edit.aspx.cs" Inherits="School.Pages.Teaching.TE_Topic_Edit" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor"
    TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:HiddenField ID="Hd_Id" runat="server" />
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <table dir="rtl" style="width: 100%; float: right">
        <tr>
            <td>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <table align="right" dir="rtl" style="width: 100%; float: right">
                            <tr>
                                <td colspan="2" class="admintitle" align="center">
                                    ادخال بيانات
                                </td>
                            </tr>
                            <tr>
                                <td nowrap="nowrap">
                                    المجمع
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlCampus" runat="server" AppendDataBoundItems="True" AutoPostBack="True"
                                        DataTextField="Name" DataValueField="Id" OnTextChanged="ddlCampus_TextChanged"
                                        Width="150px">
                                        <asp:ListItem Value="0">اختيار</asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="ddlCampus"
                                        Display="Dynamic" ErrorMessage="*" ForeColor="Red" InitialValue="0" ValidationGroup="st">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td nowrap="nowrap">
                                    الشهاده
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlCertificate" runat="server" AppendDataBoundItems="True"
                                        AutoPostBack="True" DataTextField="Name" DataValueField="Id" OnSelectedIndexChanged="ddlCertificate_SelectedIndexChanged"
                                        Width="150px" TabIndex="1">
                                        <asp:ListItem Value="0">اختيار</asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="ddlCertificate"
                                        Display="Dynamic" ErrorMessage="*" ForeColor="Red" InitialValue="0" ValidationGroup="st">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td nowrap="nowrap">
                                    المرحله
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlStadge" runat="server" AppendDataBoundItems="True" AutoPostBack="True"
                                        DataTextField="Name" DataValueField="Id" OnSelectedIndexChanged="ddlStadge_SelectedIndexChanged"
                                        Width="150px" TabIndex="2">
                                        <asp:ListItem Value="0">اختيار</asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="ddlStadge"
                                        Display="Dynamic" ErrorMessage="*" ForeColor="Red" InitialValue="0" ValidationGroup="st">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td nowrap="nowrap">
                                    الصف
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlGrade" runat="server" AppendDataBoundItems="True" DataTextField="Name"
                                        DataValueField="Id" Width="150px" TabIndex="3" AutoPostBack="True" OnSelectedIndexChanged="ddlGrade_SelectedIndexChanged">
                                        <asp:ListItem Value="0">اختيار</asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="ddlGrade"
                                        Display="Dynamic" ErrorMessage="*" ForeColor="Red" InitialValue="0" ValidationGroup="st">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td nowrap="nowrap">
                                    الفصول</td>
                                <td>
                                    <asp:ListBox ID="LbClasses" runat="server" AppendDataBoundItems="True" 
                                        DataTextField="Name" DataValueField="Id" SelectionMode="Multiple" Width="150px">
                                    </asp:ListBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator15" runat="server" 
                                        ControlToValidate="LbClasses" Display="Dynamic" ErrorMessage="*" 
                                        ForeColor="Red" InitialValue="0" ValidationGroup="st">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td nowrap="nowrap">
                                    المادة
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlsubject" runat="server" AppendDataBoundItems="True" AutoPostBack="True"
                                        DataTextField="Sub_name" DataValueField="Id" OnSelectedIndexChanged="ddlsubject_SelectedIndexChanged"
                                        Width="150px">
                                        <asp:ListItem Value="0">اختيار</asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="ddlsubject"
                                        Display="Dynamic" ErrorMessage="*" ForeColor="Red" InitialValue="0" ValidationGroup="st"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td nowrap="nowrap">
                                    الوحدة
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlCourse" runat="server" AppendDataBoundItems="True" AutoPostBack="True"
                                        DataTextField="Course_Name" DataValueField="Id" OnSelectedIndexChanged="ddlCourse_SelectedIndexChanged"
                                        Width="150px">
                                        <asp:ListItem Value="0">اختيار</asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" ControlToValidate="ddlCourse"
                                        Display="Dynamic" ErrorMessage="*" ForeColor="Red" InitialValue="0" ValidationGroup="st"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td nowrap="nowrap">
                                    اسم الدرس
                                </td>
                                <td>
                                    <asp:TextBox ID="txtName" runat="server" Width="150px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server" ControlToValidate="txtName"
                                        Display="Dynamic" ErrorMessage="*" ForeColor="Red" ValidationGroup="st"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>
        <tr>
            <td>
                <table dir="rtl" style="width: 100%; float: right">
                    <tr>
                        <td>
                            محتوي الدرس
                        </td>
                        <td>
                            <cc1:Editor ID="EDcontent" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td nowrap="nowrap">
                            المرفقات
                        </td>
                        <td>
                            <asp:FileUpload ID="FileUpload1" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td nowrap="nowrap">
                        </td>
                        <td>
                            <asp:Button ID="btnAdd" runat="server" CssClass="graybutton" OnClick="btnAdd_Click"
                                Text="اضافة مرفقات" />
                            <asp:Label ID="lblattach" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td nowrap="nowrap">
                        </td>
                        <td align="right">
                            <asp:GridView ID="gvAttach" runat="server" AllowPaging="True" AlternatingRowStyle-CssClass="GridItemAltername"
                                AutoGenerateColumns="False" CssClass="Grid" DataKeyNames="Id" FooterStyle-CssClass="GridHeaderFooter"
                                HeaderStyle-CssClass="GridHeaderFooter" OnRowDataBound="gvAttach_RowDataBound"
                                PagerStyle-CssClass="GridPager" Width="80%" OnRowDeleting="gvAttach_RowDeleting"
                                OnPageIndexChanging="gvAttach_PageIndexChanging">
                                <AlternatingRowStyle CssClass="GridItemAltername" />
                                <Columns>
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            م
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <%# Container.DataItemIndex + 1 %>
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="Attach" HeaderText="المرفق" SortExpression="Attach" />
                                    <asp:TemplateField ShowHeader="False">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lkdelete" runat="server" CausesValidation="False" CommandName="Delete"
                                                Text="حذف"></asp:LinkButton>
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:TemplateField>
                                </Columns>
                                <FooterStyle CssClass="GridHeaderFooter" />
                                <HeaderStyle CssClass="GridHeaderFooter" />
                                <PagerStyle CssClass="GridPager" />
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td nowrap="nowrap">
                        </td>
                        <td>
                            <asp:Button ID="btnSave" runat="server" CssClass="graybutton" Text="تحديث" OnClick="btnSave_Click"
                                ValidationGroup="st" />
                            <asp:Button ID="Button1" runat="server" Text="الغاء" CssClass="graybutton" OnClick="Button1_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td nowrap="nowrap">
                        </td>
                        <td>
                            <asp:Label ID="lbltst" runat="server" Visible="False"></asp:Label>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
